package com.workcell.workdata.xthings.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ValveStateEnum {

	OPEN("0","开"),
	CLOSE("1","关"),


	Over("","");

	private String code;
	private String msg;

	public static ValveStateEnum getByCode(String code) {
		for (ValveStateEnum valveStateEnum : values()) {
			if (valveStateEnum.getCode().equals(code)) {
				//获取指定的枚举
				return valveStateEnum;
			}
		}
		return ValveStateEnum.Over;
	}
}
